﻿@model  HANS_BackStage.Model.DbModel.Backstage_permission
@{
    ViewBag.Title = "编辑权限";

}

<div class="x_panel">
    <!--beginHead-->
    <div class="x_title">
        <h2>编辑权限 <small>HANS</small></h2>
        <ul class="nav navbar-right panel_toolbox">
            <li>
                <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
            </li>
        </ul>
        <div class="clearfix"></div>
    </div>
    <!--endHead-->
    <div class="x_content">
        <!--beginForm-->
        @using (Html.BeginForm("UpdatePermission", "Account", FormMethod.Post,
                                                            new { @class = "form-horizontal form-label-left js-form-submit", @novalidate = "", enctype = "multipart/form-data", id = "fileupload" }))
        {
            @Html.AntiForgeryToken()
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    名称<span class="required">*</span>
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    @Html.TextBoxFor(i => i.Permissionname, new { @class = "form-control col-md-7 col-xs-12" })
                </div>
                @Html.ValidationMessageFor(i => i.Permissionname, null, new { @class = "text-danger" })
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    描述<span class="required">*</span>
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    @Html.TextAreaFor(i => i.Description, new { @class = "form-control col-md-7 col-xs-12" })
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    菜单？<span class="required">*</span>
                </label>
                <div class="col-md-3 col-sm-3 col-xs-3  ">
                    @Html.CheckBoxFor(i => i.Ismenu, new { @class = " flat" })
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    父菜单<span class="required">*</span>
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    @Html.DropDownListFor(i => i.Parentid, (List<SelectListItem>)ViewBag.PermissionSelectItems, new { @class = "form-control col-md-7 col-xs-12" })
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    排序<span class="required">*</span>
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    @Html.TextBoxFor(i => i.Ordernum, new { @class = "form-control col-md-7 col-xs-12" })
                </div>
                @Html.ValidationMessageFor(i => i.Ordernum, null, new { @class = "text-danger" })
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    图标<span class="required">*</span>
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    @Html.TextBoxFor(i => i.Icon_url, new { @class = "form-control col-md-7 col-xs-12" })
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    控制器<span class="required">*</span>
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    @Html.TextBoxFor(i => i.Controller, new { @class = "form-control col-md-7 col-xs-12", @placeholder = "英文，区分大小写" })
                </div>
                @Html.ValidationMessageFor(i => i.Controller, null, new { @class = "text-danger" })
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    动作<span class="required">*</span>
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    @Html.TextBoxFor(i => i.Action, new { @class = "form-control col-md-7 col-xs-12", @placeholder = "英文，区分大小写" })
                </div>
                @Html.ValidationMessageFor(i => i.Action, null, new { @class = "text-danger" })
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    区域
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    @Html.TextBoxFor(i => i.Area, new { @class = "form-control col-md-7 col-xs-12", @placeholder = "英文，区分大小写" })
                </div>
                @Html.ValidationMessageFor(i => i.Area, null, new { @class = "text-danger" })
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">
                    URL
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    @Html.TextBoxFor(i => i.Url, new { @class = "form-control col-md-7 col-xs-12" })
                </div>
                @Html.ValidationMessageFor(i => i.Url, null, new { @class = "text-danger" })
            </div>
            <div class="ln_solid"></div><!--一条横线-->
            <div class="form-group">
                <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                    <button type="submit" class="btn btn-success">保存</button>
                    <a href="@HttpContext.Current.Request.UrlReferrer" class="btn btn-default">取消</a>
                </div>
            </div>
        }
        <!--endForm-->
    </div>
</div>
@section Scripts{
    <script type="text/javascript">
        $(function () {
            Messagetoastr.TypeShow.info("提示：请小心操作本页面");
        });
    </script>
}

